package cn.edu.scau.cmi.shishuai.exercise8;

public class Bank {
	int money;
	public void income(int in, int out) throws BankException {
		if (in <= 0 || out >= 0 || in + out <= 0) {
			throw new BankException(in, out);
		}
		int newIncome = in + out;
		System.out.printf("本次计算出的纯收入是: %d元", newIncome);
		money += newIncome;
	}
	public int getMoney() {
		return money;
	}
}
